package main

import "fmt"

func main() {
	//定义变量再赋值
	var num1 int
	num1 = 18
	fmt.Printf("num1的值是:%d\n", num1)

	//定义变量时赋值
	var num2 int = 19
	fmt.Printf("num2的值是:%d\n", num2)

	//存在类型推断 int可省略
	var name = "李卤味"
	fmt.Printf("num3的类型是:%T 值是:%s\n", name, name)

	//简短声明
	sum := 100
	fmt.Printf("sum的值是:%d\n", sum)

	//多变量声明
	var a, b, c = 1, true, "a"
	fmt.Printf("a,b,c的值是:%d %t %s\n", a, b, c)
}
